import request from '@/utils/request'
// 订餐须知接口
export function getClconfigAPI(id) {
	return request({
		'url': `/wx/system/config/${id}`,
		'method': 'get',
	})
}

export function getfoodSetMealAPI() {
	return request({
		'url': '/wx/food/combo/date',
		'method': 'get'
	})
}

export function getfoodSetMealAPI2() {
	return request({
		'url': '/wx/food/combo/week/date',
		'method': 'get'
	})
}

export function getfoodDateTypeAPI() {
	return request({
		'url': '/wx/food/combo/date/type',
		'method': 'get'
	})
}

export function getfoodDateTypeAPI2() {
	return request({
		'url': '/wx/food/combo/week/date/type',
		'method': 'get'
	})
}

export function getOrderListAPI() {
	return request({
		'url': '/wx/food/order/list',
		'method': 'get'
	})
}
export function getFoodDetailAPI(foodId) {
	return request({
		'url': `/wx/food/dish/${foodId}`,
		'method': 'get'
	})
}
export function getComboDetailAPI(comboId) {
	return request({
		'url': `/wx/food/combo/${comboId}`,
		'method': 'get'
	})
}

export function getComboDetailAPI2(params) {
	return request({
		'url': `/food/combo/history/detail`,
		'method': 'get',
		params:params
	})
}

export function getUnitTypeAPI(params) {
	return request({
		'url': '/system/dict/data/type/foot_ingredient_type',
		'method': 'get',
		params
	})
}
// 套餐
export function getComboListAPI(params) {
	return request({
		'url': '/wx/food/combo/date/combo',
		'method': 'get',
		params
	})
}

export function getComboListAPI2(params) {
	return request({
		'url': '/wx/food/combo/week/date/combo',
		'method': 'get',
		params
	})
}

// 菜品
export function getDishListAPI(params) {
	return request({
		'url': '/wx/food/combo/date/dish',
		'method': 'get',
		params
	})
}

export function getDishListAPI2(params) {
	return request({
		'url': '/wx/food/combo/week/date/dish',
		'method': 'get',
		params
	})
}

export function getCuisineTypeAPI(params) {
	return request({
		'url': '/system/dict/data/type/foot_cuisine_type',
		'method': 'get',
		params
	})
}
export function getHomeTodayAPI(time) {
	return request({
		'url': `/wx/food/home/date/detail?date=${time}`,
		'method': 'get',
	})
}
export function getOftenMealAPI(params) {
	return request({
		'url': `/wx/food/home/often/meal`,
		'method': 'get',
		params
	})
}
export function getSelfOftenAPI(params) {
	return request({
		'url': `/wx/food/home/often/self/meal`,
		'method': 'get',
		params
	})
}
export function getOpenidAPI(params) {
	return request({
		'url': `/wx/login`,
		'method': 'get',
		params
	})
}
export function getNoticeListAPI(params) {
	return request({
		'url': '/wx/notice/list',
		'method': 'get',
		params
	})
}
export function getOrderNumAPI(userId) {
	return request({
		'url': `/wx/food/personal/order-num/${userId}`,
		'method': 'get',

	})
}
export function getsameMealAPI(params) {
	return request({
		'url': `/wx/food/home/same/meal`,
		'method': 'get',
		params

	})
}
export function delOrderAPI(data) {
	return request({
		'url': `/wx/food/order`,
		'method': 'delete',
		data:data

	})
}

export function delOrderAPIapply(data) {
	return request({
		'url': `/wx/food/order/delete/apply`,
		'method': 'post',
		data:data

	})
}

export function getClockApprovalAPI(configKey) {
	return request({
		'url': `/system/config/configKey/object/${configKey}`,
		'method': 'get',
	})
}



// /wx/food/personal/breach/{userId}

export function getCbreachdy(userId) {
	return request({
		'url': `/wx/food/personal/breach/${userId}`,
		'method': 'get',
	})
}